<?php
/**
 * Created by litong on Date: 2019/3/28 0028 下午 7:11
 * 对应数据表 User
 */

namespace modules\Model;

use Think\Model;

class UserModel extends Model {
  protected $tableName = "auth_user";
  protected $_scope = array(
    '001' => array(
      "where" => array(
        'user' => "litong",
        'pswd' => '123'
      )
    )
  );

  public function getUser($name, $pswd) {
    $result = $this->scope('001')->select();
    return $result;
  }

  public function getScope($key) {
    return $this->scope($key);
  }
}